package com.lagou.edu.service.impl;

import com.lagou.edu.dao.ResumeDao;
import com.lagou.edu.pojo.Resume;
import com.lagou.edu.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResumeServiceImpl implements ResumeService {

    @Autowired
    ResumeDao resumeDao;

    @Override
    public List<Resume> getList() {
        return resumeDao.findAll();
    }

    @Override
    public void add(Resume resume) {
        resumeDao.save(resume);
    }

    @Override
    public void edit(Resume resume) {
        resumeDao.save(resume);
    }

    @Override
    public void delete(long id) {
        resumeDao.deleteById(id);
    }
}
